﻿using System;

namespace JZ_05_ti_huan_kong_ge_lcof
{
    class Program
    {
        static void Main (string[] args)
        {
            Console.WriteLine (ReplaceSpace ("string s asfs"));
        }

        public static string ReplaceSpace (string s)
        {
            string str = "";
            for (int i = 0;i < s.Length;i++)
            {

                if (s[i] == ' ')
                {
                    str += "%20";
                }
                else
                {
                    str += s[i].ToString ();
                }
            }

            return str;
        }
    }

}
